SQL语句如下:
update a
set a.ty2=b.ty1
from t2 a,t1 b
where a.n2=b.n1
更新t2表的ty2字段的值为t1表的ty1字段的值,条件是a表的n2=b表的n1